class Solution {
public:
    vector<int> treeNode;
    vector<int> postorderTraversal(TreeNode* root) {
    postOrder(root);
    return treeNode;
    }
    void postOrder(TreeNode* root) {
        if(root == nullptr) {
            return;
        }
        postOrder(root->left);
        postOrder(root->right);
        treeNode.push_back(root->val);
    }
};